package com.fuluwa.domain.bank.model;

import com.fuluwa.infra.exception.PersistenceException;
import java.math.BigDecimal;

public class GLAccountFactory
{
  private static GLAccountFactory instance = new GLAccountFactory();

  public void postGL(Account.AccountType accountType, BigDecimal balance)
    throws PersistenceException
  {
    new GLAccount(accountType, balance, false).save();
    new GLAccount(accountType, balance, true).save();
  }

  public static GLAccountFactory getInstance() {
    return instance;
  }
}